<div class="bjui-pageContent">
    <div><h4><?php echo Iif($menu->id, '编辑模块', '添加模块');?></h4></div>
    <form action="<?=admin_url('menu/save');?>" class="pageForm" data-toggle="validate" name="menu_edit" id="menu_edit">
        <input type="hidden" name="id" value="<?=$menu['id'];?>">
        <table class="table table-condensed table-hover">
            <tbody>
                <tr>
                    <td>
                        <label class="control-label x85">模块名称：</label>
                    </td>
                    <td width="100%">
                        <input class="form-control" type="text" name="name" value="<?=$menu['name'];?>" data-rule="required" size="16">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="control-label x85">模块地址：</label>
                    </td>
                    <td width="100%">
                        <input class="form-control" type="text" name="url" value="<?=$menu['url'];?>" data-rule="required" size="16">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="control-label x85">模块tabid：</label>
                    </td>
                    <td width="100%">
                        <input class="form-control" type="text" name="tabid" value="<?=$menu['tabid'];?>" data-rule="required" size="16">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="control-label x85">上级模块：</label>
                    </td>
                    <td width="100%">
                        <select name="parent_id" data-toggle="selectpicker" data-rule="required" size="32">
                            <option value="0">顶级菜单</option>
                            <?php foreach($menuSelect as $menuS):?>
                            <option value="<?=$menuS['id'];?>" <?php if($menu['parent_id'] == $menuS["id"]):?>selected<?php endif;?>><?=$menuS["name"];?></option>
                            <?php endforeach;?>
                        </select>
                        <!-- <input class="form-control" type="text" name="parent_id" value="<?=$menu->url;?>"  size="16"> -->
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="control-label x85">状态：</label>
                    </td>
                    <td width="100%">
                        <input type="radio" name="status" value="1" id="status-1" data-toggle="icheck" data-label="启用" <?php if($menu['status'] == 1 OR empty($admin)):?> checked<?php endif;?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <input type="radio" name="status" value="0" id="status-0" data-toggle="icheck" data-label="禁用" <?php if($menu['status'] == 0):?> checked<?php endif;?>>
                        <span style="color:red;vertial-align:middle;">(注：停用后不显示)</span>
                    </td>
                </tr>

                <tr>
                    <td>
                        <label class="control-label x85">备注：</label>
                    </td>
                    <td width="100%">
                        <textarea class="form-control" name="context"  rows="4" cols="50" ><?=$menu['context'];?></textarea>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close">关闭</button></li>
        <li><button type="submit" class="btn-green">保存</button></li>
    </ul>
</div>